﻿Public Class Form3
    Private Sub Form3_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown
        If e.KeyCode = (e.Control And Keys.N) Then
            Me.Tbl_testIUltraGrid.getTaoMoi()
        End If
        If e.KeyCode = (e.Control And Keys.S) Then
            Me.Tbl_testIUltraGrid.getLuu()
        End If
        If e.KeyCode = (e.Control And Keys.D) Then
            Me.Tbl_testIUltraGrid.getXoa()
        End If
        If e.KeyCode = (e.Control And Keys.Q) Then
            Me.Dispose()
            Me.Close()
        End If
    End Sub
    Private Sub Form3_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Me.Tbl_thuTableAdapter.Fill(Me.Test4DataSet.tbl_thu)
        Me.Tbl_testTableAdapter.Fill(Me.Test4DataSet.tbl_test)
        Me.Tbl_testIUltraGrid.setChoPhepThemDong()
        Me.Tbl_testIUltraGrid.setDoiTuongXuLyDuLieu(Me.Test4DataSet.tbl_test, Me.Tbl_testBindingSource, Me.Tbl_testTableAdapter, Test4DataSet)
        Me.Tbl_testIUltraGrid.setTimKiemTrenCotUltraGrid()
        Me.Tbl_testIUltraGrid.setThemIUltraDropDown(Me.Tbl_thuIUltraDropDown, Me.Test4DataSet.tbl_thu)
        Me.Tbl_thuIUltraDropDown.setGiaoDien()
        Me.Tbl_testIUltraGrid.setCotBatLoi("ghichu")
        'Me.Tbl_testIUltraGrid.setCotKhongXoXuong("ngay")
        Me.Tbl_testIUltraGrid.setGiaoDienTuDong()
        'Me.IUltraGrid1.setDataTable(Me.Test4DataSet.tbl_test)
        'Me.IUltraGrid1.setChoPhepThemDong()
        'Me.IUltraGrid1.setDoiTuongXuLyDuLieu(Me.Test4DataSet.tbl_test, Me.Tbl_testBindingSource, Me.Tbl_testTableAdapter, Test4DataSet)
        'Me.IUltraGrid1.setThemIUltraDropDown(Me.Tbl_thuIUltraDropDown, Me.Test4DataSet.tbl_thu)
        'Dim htLayGiaTriTuIUltraDropDown As Hashtable = New Hashtable
        'htLayGiaTriTuIUltraDropDown.Add("ten", "ten")
        'htLayGiaTriTuIUltraDropDown.Add(New Date(1988, 12, 12), "ngay")
        'htLayGiaTriTuIUltraDropDown.Add("ghichu", "ghichu")
        'Me.Tbl_testIUltraGrid.setThemIUltraDropDown(Me.Tbl_thuIUltraDropDown, Me.Test4DataSet.tbl_thu, htLayGiaTriTuIUltraDropDown)
        'Me.IUltraGrid1.setGiaoDienVua()
        'Me.IUltraGrid1.setGroupBy("ma")
    End Sub
    Private Sub Tbl_testIUltraGrid_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Tbl_testIUltraGrid.KeyDown
        ' Me.Tbl_testIUltraGrid.setKeyDownUltraGridNhanFocus("ghichu", Me.IUltraGrid1)
    End Sub
    Private Sub UltraButton1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles UltraButton1.Click
        Me.Tbl_testIUltraGrid.getLuu()
    End Sub
    Private Sub UltraButton2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles UltraButton2.Click
        Me.Tbl_testIUltraGrid.getTaoMoi()
    End Sub
    Private Sub UltraButton3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles UltraButton3.Click
        Me.Tbl_testIUltraGrid.getXoa()
    End Sub
    Private Sub UltraButton4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles UltraButton4.Click
        Me.Dispose(True)
        Me.Close()
    End Sub
End Class